//
//  Util.h
//  OAProject
//
//  Created by yhj on 2017/2/21.
//  Copyright © 2017年 cdnunion. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Util : NSObject

// 获取当前的时间
+(NSString*)getCurrentTimes;

// 时间转时间戳
+(NSString *)getTimeStampByDate:(NSString *)timeStr;

// 一般加密
+(NSString *)md5String:(NSString *)str;

+(NSString *)md5StringBest:(NSString *)str;



+(BOOL)saveObjectToUserDefault:(id)object forKey:(NSString *)key;

+(id)getUserDefaultObjectForKey:(NSString *)key;

+(CGFloat)getWidthByCurrentSize:(NSString *)text withHeight:(CGFloat)height withWidthLimit:(CGFloat)widthLimit withFont:(CGFloat)fontSize;

+(CGFloat)getHeightByCurrentSize:(NSString *)text withWidth:(CGFloat)width widthHeightLimit:(CGFloat)heightLimit withFont:(CGFloat)fontSize;

+(CGFloat)GetHeightWithText:(NSString *)text width:(CGFloat)width  limitHeight:(CGFloat)limitHeight font:(CGFloat)font;

extern UIView *setViewCoord_Y(UIView *view,CGFloat y);

extern UIView *setViewHeight_Add(UIView *view,CGFloat height);

// 判断请求的域名是哪个
+(NSString *)GetBaseUrl;

+(NSString *)TaskStatusTitleByNumber:(NSString *)number;

/*
 *改变uiiamge 的大小
 *Quartz-2D,栈空间
 */
+(UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size;

+(id)transformedValue:(id)value;

@end
